package com.fangcun.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.fangcun.bean.admin.order.request.OrderRequest;
import com.fangcun.bean.admin.order.response.OrderDetailsResponse;
import com.fangcun.bean.admin.order.response.OrderResponse;
import com.fangcun.bean.api.order.request.OrderDetailRequest;
import com.fangcun.bean.api.order.request.OrderListRequest;
import com.fangcun.bean.api.order.response.OrderDetailResponse;
import com.fangcun.bean.api.order.response.OrderListResponse;
import com.fangcun.bean.api.order.response.OrderStatusNumberResponse;
import com.fangcun.entity.Order;

public interface OrderMapper {

	int deleteByPrimaryKey(Long id);

	int insert(Order record);

	int insertSelective(Order record);

	Order selectByPrimaryKey(Long id);

	int updateByPrimaryKeySelective(Order record);

	int updateByPrimaryKey(Order record);

	List<OrderListResponse> listForApi(OrderListRequest request);

	OrderDetailResponse detailForApi(OrderDetailRequest request);

	/** 获取用户订单每个状态的数量 **/
	List<OrderStatusNumberResponse> getOrderStatusNumberList(Long userId);

	/** 后台-订单列表 **/
	List<OrderResponse> listForAdmin(OrderRequest request);

	/** 后台-订单详情 **/
	OrderDetailsResponse adminOrderDetail(@Param("id") Long id);

	/** 后台-订单导出 **/
	List<OrderDetailsResponse> listForExcel(OrderRequest request);

}